package com.lanou.timeline.mapper;

import com.lanou.timeline.entity.Timeline;
import com.lanou.timeline.entity.Userinfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TimelineMapper {

    List<Timeline> showByTagId(Long tagId);

    List<Timeline> showByTagIdAndUid(@Param("tagId") Long tagId,@Param("uid") Integer uid);

    int showIsLike(@Param("timelineId") String timelineId, @Param("uid") Integer uid);

    int showMyTimeline(@Param("timelineId") String timelineId, @Param("uid") Integer uid);

    void addIslike(@Param("timelineId") String timelineId, @Param("uid") Integer uid);

    void delIslike(@Param("timelineId") String timelineId, @Param("uid") Integer uid);

    Integer selectTimelineReport(String timelineId);

    void reoprtTimeline(@Param("timelineId") String timelineId, @Param("uid") Integer uid, @Param("reportCount") Integer reportCount);

    void deleteTimeline(@Param("timelineId") String timelineId, @Param("uid") Integer uid);

    List<Timeline> selectByUid(@Param("uid") Integer uid);

    Timeline selectByTimelineId(@Param("timelineId") String timelineId);

    void releaseTimeline(Timeline timeline);

    List<Timeline> relevantTimeline();

    List<Timeline> showAllTimeline();

    List<Userinfo> selectUserActive(Long addtime);

    void insertTimelineSecret(Timeline timeline);

    void addIsSecret(@Param("uid") Integer uid, @Param("timelineId") String timelineId);
}
